package com.yyy.spring6.di2;

import java.util.Arrays;

/**
 * @Project ：learn_spring
 * @File ：Employee.java
 * @IDE ：IntelliJ IDEA
 * @Author ：自由如风间
 * @Date ：2025/3/29 17:18
 * @Description ：For study.
 */

// 员工类
public class Employee {

    private String name;
    private Integer age;
    // 所属部门
    private Department department;
    // 爱好
    private String[] hobbies;

    public String[] getHobbies() {
        return hobbies;
    }

    public void setHobbies(String[] hobbies) {
        this.hobbies = hobbies;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Department getDepartment() {
        return department;
    }

    public void setDepartment(Department department) {
        this.department = department;
    }

    public void work() {
        System.out.println("员工：" + name + " 年方：" + age + " 在工作...");
        department.info();
        System.out.println("最喜欢的事是：" + Arrays.toString(hobbies));
    }
}
